<template>
  <div>
    <div class='header'>
      <img class='bg' :src="data.avatar" alt="">
      <div class="picleft">
        <img :src="data.avatar" alt="">
      </div>
      <div class="textright">
        <h3>
          <span class='pinpai'></span> {{data.name}}
        </h3>
        <p>{{data.description}}/{{data.deliveryTime}}分钟到达</p>
        <p>
          <span class='jian'></span>{{data.description}}/{{data.deliveryTime}}分钟到达</p>
      </div>
      <div class="number">
        5个>
      </div>
      <div class="news" @click='isShow'>
        <p>
          <span></span>{{data.bulletin}}</p>
      </div>
    </div>
    <div class="content" v-if='show'>
      <h3>{{data.name}}</h3>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <div class="youhuixinxi">
        <div class="line"></div>
        <div class="youhui">优惠信息</div>
        <div class="line"></div>
      </div>
      <ul>
        <!--vfor渲染li标签-->
        <li v-for='item in data.supports'>
          <i></i> {{item.description}}
        </li>
       
      </ul>
      <div class="youhuixinxi">
        <div class="line"></div>
        <div class="youhui">商家公告</div>
        <div class="line"></div>
      </div>
      <p>
        {{data.bulletin}}
      </p>
      <div class="close" @click='isHide'>
        <i class='iconfont icon-close'></i>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        // 定义空对象储存数据
        data:{},
        show:false

      }
    },
    created: function () {
      this.$http.get('http://localhost:8080/api/getSeller')
        .then(function (res) {
          if (res.body.status !== 0) {
        
          //  拿到数据赋值给data保存数据
           this.data = res.body.data
           
          }

        })
        
    },
    methods: {
      isShow(){
        this.show=true;
      },
      isHide(){
        this.show=false;
      }
    }
  }

</script>
<style scoped>
  /*头部样式*/
  
  .header {
    width: 100%;
    height: 135px;
    background: rgba(7, 17, 27, 0.5);
    padding: 30px 0 0 30px;
    color: #fff;
    position: relative;
  }
  
  .header .bg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    -webkit-filter: blur(5px);
    /* Chrome, Safari, Opera */
    filter: blur(5px);
  }
  
  .header .picleft img {
    width: 64px;
    height: 70px;
  }
  
  .header .textright,
  .header .picleft {
    float: left;
  }
  
  .header .textright {
    margin-left: 15px;
  }
  
  .header .textright h3 {
    font-size: 18px;
  }
  
  .header .textright .pinpai {
    vertical-align: top;
    display: inline-block;
    width: 30px;
    height: 18px;
    background: url(../images/002.png) no-repeat;
    background-size: 30px 18px
  }
  
  .header .textright .jian {
    vertical-align: top;
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url(../images/003.png) no-repeat;
    background-size: 12px 12px
  }
  
  .header .number {
    width: 50px;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    position: absolute;
    top: 82px;
    right: 40px;
    text-align: center;
    line-height: 24px;
    font-family: consolas;
  }
  
  .header .news span {
    vertical-align: top;
    display: inline-block;
    width: 22px;
    height: 12px;
    background: url(../images/001.png) no-repeat;
    background-size: 22px 12px;
  }
  
  .header .news {
    padding: 0 15px 0 15px;
    font-size: 10px;
    width: 100%;
    height: 30px;
    white-space: nowrap;
    margin-bottom: 10px;
    position: absolute;
    bottom: -9px;
    left: 0;
    background: rgba(7, 17, 27, 0.2);
  }
  /*点击显示详细信息栏样式*/
  
  .content {
    width: 100%;
    height: 650px;
    background: rgba(7, 17, 27, 0.8);
    position: absolute;
    top: 0;
    left: 0;
    color: #fff;
    text-align: center;
    z-index: 999;
  }
  
  .content h3 {
    margin-top: 70px;
  }
  
  .content span {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url(../images/xx.png) no-repeat;
    background-size: 20px 20px;
    margin: 20px 0 0 15px;
  }
  
  .content span:last-of-type {
    background: url(../images/x.png) no-repeat;
    background-size: 20px 20px;
  }
  
  .content .youhuixinxi {
    display: flex;
    margin: 20px 50px 20px 50px;
  }
  
  .content .line {
    height: 10px;
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    ;
  }
  
  .content .youhui {
    line-height: 20px;
    font-weight: bold;
    font-size: 14px;
    margin: 0 20px;
  }
  
  .content ul li:first-child i {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url(../images/003.png) no-repeat;
    background-size: 16px 16px;
  }
  
  .content ul li:nth-child(2) i {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url(../images/004.png) no-repeat;
    background-size: 16px 16px;
  }
  
  .content ul li:nth-child(3) i {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url(../images/008.png) no-repeat;
    background-size: 16px 16px;
  }
  
  .content ul li:nth-child(4) i {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url(../images/005.png) no-repeat;
    background-size: 16px 16px;
  }
  
  .content ul li:nth-child(5) i {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url(../images/006.png) no-repeat;
    background-size: 16px 16px;
  }
  
  .content ul li i {
    vertical-align: middle;
  }
  
  .content ul {
    margin-left: 50px;
  }
  
  .content ul li {
    text-align: left;
    line-height: 30px;
  }
  
  .content p {
    margin: 0 60px 0 60px;
    line-height: 25px;
    text-align: left;
  }
  
  .content .close {
    margin-top: 50px;
  }
  
  .content .close i {
    font-size: 30px;
  }
 

</style>
